<!--<meta http-equiv="refresh" content="1"/>-->
<link href="__PUBLIC__/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="__PUBLIC__/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="__PUBLIC__/js/bootstrap.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
<script src="__PUBLIC__/Admin/js/BookShow.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>书籍展示</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">书籍是人类进步的阶梯。</span>
    </div>

    <div class="enter_box">
        <div class="show_sousuo">
            <form action="{:U('Admin/BookManage/bookShow')}" method="post">
                <span id="select_title1">书籍名称：</span>
                <input type="text" name="book_name">
                <select name="select_title" id="select_title">
                    <option value="book_type_id">图书类型</option>
                    <option value="book_case_id">图书书架</option>
                    <option value="book_isbn_id">出版社</option>
                </select>
                <select name="book_type_id" class="city" >
                    <option value="">请选择</option>
                    <volist name="_getBookTypeTableInfo" id="vo" >
                        <option value="{$vo['book_type_id']}">{$vo['book_type_name']}</option>
                    </volist>
                </select>
                <select name="book_case_id" class="city" >
                    <option value="">请选择</option>
                    <volist name="_getBookCaseTableInfo" id="zo">
                        <option value="{$zo['book_case_id']}">{$zo['book_case_name']}</option>
                    </volist>
                </select>
                <select name="book_isbn_id" class="city">
                    <option value="">请选择</option>
                    <volist name="_getBookIsbnTableInfo" id="fo">
                        <option value="{$fo['book_isbn_id']}">{$fo['book_isbn_name']}</option>
                    </volist>
                </select>
                <div class="read_submit" id="show_left">
                    <img src="__PUBLIC__/Admin/img/record_02.jpg" alt="搜索">
                    <input type="submit" value="查询" >
                    <a href="{:U('Admin/BookManage/bookEntering')}">添加</a>
                </div>
            </form>
        </div>
        <div class="book_show_box">
            <div class="book_show_span">
                <!--<span>书籍信息<c id="c_color">（点击图书名称查看详情）</c></span>-->
                <span>书籍信息</c></span>
            </div>
            <div class="height_con">
                <table class="book_show_table">
                    <tr>
                        <!--<th>条形码</th>-->
                        <th>图书名称</th>
                        <th>图书类型</th>
                        <th>图书书架</th>
                        <th>出版社</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    <volist name="_getBookShowInfo" id="vo">
                        <if condition="$vo['book_del'] eq 1">
                            <tr>
                                <!--<td>{$vo['book_barcode']}</td>-->
                                <td class="court_name">
                                    {$vo['book_name']}
                                </td>
                                <td>
                                    <volist name="_getBookTypeTableInfo" id="so" >
                                        <if condition="$vo['book_type_id'] eq $so['book_type_id']">{$so['book_type_name']}</if>
                                    </volist>
                                </td>
                                <td>
                                    <volist name="_getBookCaseTableInfo" id="so">
                                        <if condition="$vo['book_case_id'] eq $so['book_case_id']">{$so['book_case_name']}</if>
                                    </volist>
                                </td>
                                <td>
                                    <volist name="_getBookIsbnTableInfo" id="so">
                                        <if condition="$vo['book_isbn_id'] eq $so['book_isbn_id']">{$so['book_isbn_name']}</if>
                                    </volist>
                                </td>
                                <td class="status1">{$vo['book_del']}</td>
                                <td>
                                    <a href="{:U('Admin/BookManage/bookShowSaveTiao',array('book_id'=>$vo['book_id']))}" class="wyz_a"><button class="wyz_bb">编辑</button></a>
                                    <button class="del wyz_dd1" data-id-del="{$vo['book_id']}">禁用</button>
                                    <input type="hidden" value="{:U('Admin/BookManage/bookShowDel')}" id="del_url">
                                </td>
                            </tr>
                            <else/>
                            <tr>
                                <!--<td>{$vo['book_barcode']}</td>-->
                                <td class="court_name">
                                    {$vo['book_name']}
                                </td>
                                <td>
                                    <volist name="_getBookTypeTableInfo" id="so" >
                                        <if condition="$vo['book_type_id'] eq $so['book_type_id']">{$so['book_type_name']}</if>
                                    </volist>
                                </td>
                                <td>
                                    <volist name="_getBookCaseTableInfo" id="so">
                                        <if condition="$vo['book_case_id'] eq $so['book_case_id']">{$so['book_case_name']}</if>
                                    </volist>
                                </td>
                                <td>
                                    <volist name="_getBookIsbnTableInfo" id="so">
                                        <if condition="$vo['book_isbn_id'] eq $so['book_isbn_id']">{$so['book_isbn_name']}</if>
                                    </volist>
                                </td>
                                <td class="status2">{$vo['book_del']}</td>
                                <td>
                                    <a href="{:U('Admin/BookManage/bookShowSaveTiao',array('book_id'=>$vo['book_id']))}" class="wyz_a"><button class="wyz_bb">编辑</button></a>
                                    <button class="rec wyz_bb" data-id-rec="{$vo['book_id']}">恢复</button>
                                    <input type="hidden" value="{:U('Admin/BookManage/bookShowRec')}" id="rec_url">
                                </td>
                            </tr>
                        </if>
                    </volist>

                    <input type="hidden" value="{:U('Admin/BookManage/sessionBookId')}" id="srceen-url">
                    <input value="{:U('Admin/BookManage/bookShow')}" id="url_info" type="hidden">
                </table>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {
        $("#select_title").change(function () {
            $("#select_title option").each(function (i, o) {
                if ($(this).attr("selected")) {
                    $(".city").hide();
                    $(".city").eq(i).show();
                }
            });
        });
        $("#select_title").change();
    });
//    function shuaxin(){
//        location.replace(location);
//    }
    $('.status1').html("上架");
    $('.status2').html("下架");
</script>